﻿using ChineseSchool.Models.Hethong;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ChineseSchool.BLL
{
    public class B_ActionLog
    {
        private PetaPoco.Database db;
        public B_ActionLog()
        {
            db = new PetaPoco.Database("ConnectionString");
        }

        public void SaveLog(string userName, int actionId, string content)
        {
            var log = new M_ActionLog()
            {
                UserName = userName,
                ActionId = actionId,
                ContentLog = content,
                CreateDate = DateTime.Now
            };
            (new B_Insert_Update_Delete()).insert("ActionLog", "ActionLogId", log);
        }
    }
}